<%= form_for(@stock) do |f| %>
  <% if @stock.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@stock.errors.count, "error") %> prohibited this stock from being saved:</h2>

      <ul>
      <% @stock.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>


  <div class="field">
    <%= f.label :product_id %><br />
    <%= f.number_field :product_id %>
  </div>
  <div class="field">
    <%= f.label :size_id %><br />
    <%= f.number_field :size_id %>
  </div>
  <div class="field">
    <%= f.label :quantity %><br />
    <%= f.number_field :quantity %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
